package net.anzix.jhacks.flexclipse.builder;

import org.eclipse.core.runtime.IProgressMonitor;

import flex2.tools.oem.ProgressMeter;

/**
 * Flex compiler progress monitor adapter to eclipse progress monitor.
 * @author kocka
 *
 */
public class FlexBuildProgressMeter implements ProgressMeter {

	final IProgressMonitor monitor;

	public FlexBuildProgressMeter(final IProgressMonitor monitor) {
		super();
		this.monitor = monitor;
	}

	public void end() {
		monitor.done();
	}

	public void percentDone(final int percent) {
		monitor.worked(percent);
	}

	public void start() {
		monitor.beginTask("Compiling MXML", 100);
	}

}
